import { AD_RECEIVE } from '../constants/ActionTypes';

const defaultState = {
  data: null,
};

export default (state = defaultState, action) => {
  const { type, payload } = action;
  switch (type) {
    case AD_RECEIVE:
      return { ...state, data: payload };
    default:
      return state;
  }
};
